home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Screen Parts / WindowScreenPart.cp < prev    next >
Text File  |  1997-06-28  |  544b  |  27 lines

  1. // WindowScreenPart.cp
  2.  
  3. #ifndef WindowScreenPart_h
  4. #include "WindowScreenPart.h"
  5. #endif
  6. #ifndef Application_h
  7. #include "Application.h"
  8. #endif
  9.  
  10. WindowScreenPart::WindowScreenPart( WindowPtr theWindow,
  11.                                                 Clicker theClicker )
  12.   : window( theWindow ),
  13.      abstraction( Application::The().LocateWindow( theWindow ) ),
  14.      clicker( theClicker )
  15.   {
  16.   }
  17.  
  18. bool WindowScreenPart::Active() const
  19.   {
  20.     return window == FrontWindow();
  21.   }
  22.  
  23. void WindowScreenPart::Click( const MouseDownEvent& event ) const
  24.   {
  25.     ( abstraction.*clicker )( event );
  26.   }
  27.